package io.gitee.zhangbinhub.admin.oauth.po

import io.swagger.v3.oas.annotations.media.Schema
import jakarta.validation.constraints.NotBlank
import jakarta.validation.constraints.NotNull

/**
 * @author zhangbin by 2018-1-17 15:50
 * @since JDK 11
 */
@Schema(description = "用户信息参数")
data class UserPo(

    @Schema(description = "用户ID")
    var id: String? = null,

    @Schema(description = "用户名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @get:NotBlank(message = "用户名称不能为空")
    var name: String? = null,

    @Schema(description = "登录账号", requiredMode = Schema.RequiredMode.REQUIRED)
    @get:NotBlank(message = "登录账号不能为空")
    var loginNo: String? = null,

    @Schema(description = "手机号")
    var mobile: String? = null,

    @Schema(description = "用户级别", requiredMode = Schema.RequiredMode.REQUIRED)
    @get:NotNull(message = "用户级别不能为空")
    var levels: Int? = null,

    @Schema(description = "是否启用", requiredMode = Schema.RequiredMode.REQUIRED)
    @get:NotNull(message = "是否启用不能为空")
    var enabled: Boolean? = null,

    @Schema(description = "序号", requiredMode = Schema.RequiredMode.REQUIRED)
    var sort: Int = 0,

    @Schema(description = "所属机构ID")
    var orgIds: MutableList<String> = mutableListOf(),

    @Schema(description = "可管理机构ID")
    var orgMngIds: MutableList<String> = mutableListOf(),

    @Schema(description = "所属角色ID")
    var roleIds: MutableList<String> = mutableListOf(),

    @Schema(description = "机构名称，查询时使用")
    var orgName: String? = null,

    @Schema(description = "角色名称，查询时使用")
    var roleName: String? = null
)
